@import "~@hi-ui/core-css/lib/index.scss";

$prefix: "#{$component-prefix}-spinner" !default;

.#{$prefix} {
  width: 1em;
  height: 1em;
  display: inline-block;
  cursor: default;
  color: use-color-mode("primary");

  &--size {
    &-sm {
      font-size: use-height-size(4);
    }

    &-md {
      font-size: use-height-size(6);
    }

    &-lg {
      font-size: use-height-size(9);
    }
  }

  svg.#{$prefix}__icon {
    @keyframes #{$component-prefix}-rotate {
      to {
        transform: rotate(360deg);
      }
    }

    width: 1em;
    height: 1em;
    stroke: none;
    fill: currentColor;
    animation-name: #{$component-prefix}-rotate;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: 1s;
  }
}
